package httpUtil;

import android.text.TextUtils;

import utils.ConstantUtil;

import utils.SharedPrefUtil;

/**
 * Created by Administrator on 2016/10/14 0014.
 */

public class Api {

//    static String URL_IP = "http://cscec.imwork.net:29113";
        static String URL_IP = "http://192.168.1.143:8055";
    static String URL_ROOT = getUrlIp() + "/API/APP";

    public static int getXMBS() {
        if (XMBS == 0) {
            XMBS = SharedPrefUtil.getInstance().getInt(ConstantUtil.XMBS);
        }
        return XMBS;
    }

    public static void setXMBS(int XMBS) {

        SharedPrefUtil.getInstance().putInt(ConstantUtil.XMBS, XMBS);
    }

    private static int XMBS;

    public static String getUrlIp() {
        if (TextUtils.isEmpty(URL_IP)) {
            URL_IP = SharedPrefUtil.getInstance().getString(ConstantUtil.URL);
        }
        return URL_IP;
    }

    public static void setUrlIp(String urlIp) {
        URL_IP = null;
        SharedPrefUtil.getInstance().putString(ConstantUtil.URL, urlIp);

    }

    public static String getUrlRoot() {
        return URL_ROOT;
    }

    public static void setUrlRoot(String urlRoot) {
        URL_ROOT = urlRoot;
    }


    public static String APPLogin = "/APPLogin";
    //    public static String GetBSGZ = "/GetBSGZ";
    public static String AddGDB = "/AddGDB";
    public static String GetBMJGTree = "/GetBMJGTree";
    public static String GetGWDAByBMJGWJ = "/GetGWDAByBMJGWJ";

    public static String GetZYDA = "/GetZYDA";
    public static String GetKHDA = "/GetKHDA";
    public static String GetZYS = "/GetZYS";
    public static String GetBSGZ = "/GetBSGZ";
    public static String GetJDB = "/GetJDB";
    public static String GetDBB = "/GetDBB";
    public static String GetWGB = "/GetWGB";
    public static String GetHFB = "/GetHFB";
    public static String GetGDB = "/GetGDB";
    public static String GetDBBByGBDZJ = "/GetDBBByGBDZJ";
    public static String AddDBB = "/AddDBB";
    public static String AddJDB = "/AddJDB";
    public static String CloseGDB = "/CloseGDB";
//    public static String GetGDB = "/GetGDB";
//    public static String GetGDB = "/GetGDB";
//    public static String GetGDB = "/GetGDB";
//    public static String GetGDB = "/GetGDB";



}
